<template>
  <div class="home">
    <v-row>
      <v-col md="3" cols="12">
        <search-box @search-movie="handleSearchResult" />
      </v-col>
    </v-row>
    <v-row>
      <v-col cols="12" md="3" sm="6"
             v-for="(item, index) in items" :key="index">
        <exam-paper :item="item"/>
      </v-col>
    </v-row>
  </div>
</template>

<script>
import ExamPaper from "../components/ExamPaper.vue";
import {paperGet} from "../api/job";
import SearchBox from "@/components/SearchBox.vue";

export default {
  components: {ExamPaper, SearchBox},
  name: "Home",
  data: () => ({
    items: []
  }),
  async mounted() {
    await paperGet({"keyword": ''}).then(res => {
      // console.log(res.data)
      this.items = res.data.data
    })
  },
  methods: {
    handleSearchResult(result){
      // console.log(result)
      this.items = result
    }
  }
}
</script>

<style scoped>

</style>
